package cn.xluobo.business.wechat.miniapp.base.controller;

import cn.xluobo.business.sys.admin.service.BusinessSysUserService;
import cn.xluobo.core.api.APIResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 租户
 * @author ：KingLong
 * @date ：Created in 2020/10/22 22:29
 */
@RestController
@RequestMapping("/api/wechat/miniapp/{appId}/base/tenant")
public class WechatMiniTenantController {

    @Autowired
    private BusinessSysUserService businessSysUserService;


    /**
     * 切换机构
     * @param tenantId
     * @return
     */
    @PostMapping("/switchTenant")
    public APIResponse switchCampus(String tenantId) {
        return businessSysUserService.switchNowTenant(tenantId);
    }


}
